package api

import (
	"github.com/gin-gonic/gin"
	"zy16/api/handlers"
	"zy16/pkg"
)

func LoadApiRouter(r *gin.Engine) {
	user := r.Group("/user")
	{
		user.POST("/upload", handlers.Upload)
		user.POST("/login", handlers.Login)

		user.Use(pkg.JWTAuth("zj"))
		user.POST("/chat", handlers.Chat)
		user.POST("/addArticle", handlers.AddArticle)
		user.POST("/addFocu", handlers.AddFocu) //关注
		user.GET("/list", handlers.List)
	}
}
